#ifndef FORM_YB_DZBL_H
#define FORM_YB_DZBL_H

#include <QWidget>

#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QNetworkInterface>
#include <QNetworkRequest>
#include <QJsonObject>
#include <QJsonArray>
#include <QSqlQuery>
#include <QMap>
#include <QSqlQueryModel>
#include <QFile>

namespace Ui {
class Form_dzbl;
}

class Form_dzbl : public QWidget
{
    Q_OBJECT

public:
    explicit Form_dzbl(QWidget *parent = nullptr);
    ~Form_dzbl();
    void icpc(int);
    void jjjs();
    void mjzyb(int);
    void mjzzf(int);
    void zfsc(int);
    bool putBaseIn( QJsonObject &in, QString code);
    //void getInformation(QString);

signals:

    void destroyW(QString);

private slots:
    void closeEvent(QCloseEvent *event);
    void on_pbSearch_clicked();
    void on_pbSingle_clicked();
    void on_pbAll_clicked();
    void on_pbExit_clicked();

    bool call_noRet(QString busi, QJsonObject &inpu, QString clinic_code = "");

    void on_cbUnUpload_clicked();

    void on_cbSingle_clicked();

    void on_tvList_doubleClicked(const QModelIndex &index);

    void on_tvList_clicked(const QModelIndex &index);

    void on_rbMjzzf_clicked();
    void on_rbMjzyb_clicked();
    void on_rbZfsc_clicked();

    void on_rbIcpc_clicked();

    void on_pbTemp_clicked();

    void on_pb4201_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_2_clicked();

    void on_cbYb_clicked();

private:
    Ui::Form_dzbl *ui;
    QSqlQuery *qrm,*qrmt, *qro, *qrot;
    QSqlQueryModel mdList ;
    QString sq;

    QNetworkRequest request;
    QNetworkAccessManager manager ;

    QString currentMsgid;

    QMap<QString, QString> patientInfo;

    QJsonObject personBaseinfo; //1101
    QJsonObject personInsuinfo; //1101
    QJsonObject personIdetinfo; //1101

    QJsonObject person2207; //
    QJsonObject person2201;
    QJsonObject person2203;
    QJsonArray person2203a;

    bool isAll;

    QFile *logFile;
    bool isInsuManager;

};

#endif // FORM_DZBL_H
